﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TGBTech.Core.Models.Models.BaoCao
{
    public class SoNhatKyChiThuTien
    {
        private Boolean _IsChi;
        //notes
        //if SoThu No 111, SoChi Co 111
        public SoNhatKyChiThuTien()
        {
            ListTaiKhoanDoiUng = new Dictionary<string,decimal>();
            ListModel = new List<SoNhatKyChiThuTienModel.SoNhatKyChiThuTienModel>();
        }
        //default of TenSo
        public static String SONHATKITHUTIEN = "SỔ NHẬT KÝ THU TIỀN";
        public static String SONHATKICHITIEN = "SỔ NHẬT KÝ CHI TIỀN";
        public String Id { get; set; }
        public virtual List<SoNhatKyChiThuTienModel.SoNhatKyChiThuTienModel> ListModel { get; set; }
        public DateTime? NgayBatDau { get; set; }
        public DateTime? NgayKetThuc { get; set; }
        public Boolean IsChi { get {return _IsChi; } set {SetIsChi(value); } }
        public String TenSo { get; private set; }
        //view list of taikhoandoiung
        public Dictionary<String, Decimal> ListTaiKhoanDoiUng { get; set; }
        //set type of this
        private void SetIsChi(Boolean input) {
            _IsChi = input;
            if (input) {
                TenSo = SONHATKICHITIEN;
            } else {
                TenSo = SONHATKITHUTIEN;
            }
        }
    }
}
